package org.jeecg.modules.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.entity.DbCity;
import org.jeecg.modules.service.IDbCityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

//@Api(tags="db_city")
@RestController
@RequestMapping("/dbCity")
@Slf4j
public class DbCityController extends JeecgController<DbCity, IDbCityService> {
    @Autowired
    private IDbCityService dbCityService;

    /**
     * 省市区三级查询
     * @return
     */
    @GetMapping("/list")
//    @ApiOperation(value="db_city-省市区三级查询", notes="db_city-省市区三级查询")
    public Result<List<DbCity>> city(){
        List<DbCity> list = dbCityService.getRegions();
        return Result.OK(list);
    }
}
